docs: add NebulaGraph migration proposal artifacts#40
Open
parkermeng2024 wants to merge 26 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a substantial set of NebulaGraph hypergraph migration/validation artifacts and wiring to support selecting a NebulaGraph-backed BaseHypergraphStorage implementation behind an explicit “validated serving” gate, alongside documentation/spec artifacts and Web UI settings persistence improvements.
Changes:
- Add NebulaGraph modules (config/IDs/schema/client/storage/migration/validation) plus a schema-check CLI and extensive unit test coverage.
- Wire HyperRAG backend selection to enable NebulaGraph serving only when explicitly configured and validated; pass Web UI settings through as
addon_params. - Add rollout documentation + OpenSpec proposal/design/tasks artifacts, and add
nebula3-pythonas a dependency.
Reviewed changes
Copilot reviewed 31 out of 32 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| web-ui/backend/settings_helpers.py | Adds helper to merge incoming settings with existing settings while preserving masked API keys and unknown keys. |
| web-ui/backend/requirements.txt | Adds nebula3-python dependency for backend environment. |
| web-ui/backend/main.py | Wires settings merge on save, adds backend-mode settings, adjusts defaults, and exposes backend diagnostics in status. |
| tests/test_webui_settings_helpers.py | Unit tests for settings merge behavior (masked apiKey, unknown keys, NebulaGraph fields). |
| tests/test_nebulagraph_validation.py | Async tests for storage parity reporting and mismatch handling. |
| tests/test_nebulagraph_storage.py | Adapter semantics tests for NebulaHypergraphStorage. |
| tests/test_nebulagraph_schema.py | Tests for required schema DDL fragments and space statement generation. |
| tests/test_nebulagraph_retrieval_validation.py | Tests RetrievalParityResult.passed() threshold logic. |
| tests/test_nebulagraph_migration.py | Tests HGDB snapshot loading and idempotent migration semantics. |
| tests/test_nebulagraph_ids.py | Tests canonical ID hashing and deterministic id_set normalization. |
| tests/test_nebulagraph_config.py | Tests backend mode parsing, validation gating, and config coercion. |
| tests/test_nebulagraph_client.py | Tests fake NebulaGraph client statement recording/availability. |
| tests/test_nebulagraph_cli.py | Tests schema-check CLI parser/behavior and placeholder commands. |
| tests/test_nebulagraph_backend_selection.py | Tests that serving selection is gated behind validation (incl. addon_params override). |
| scripts/hyperrag_nebulagraph.py | Adds CLI entrypoint (schema-check implemented; migrate/validate placeholders). |
| requirements.txt | Adds nebula3-python dependency for root environment. |
| openspec/config.yaml | Adds OpenSpec config scaffold. |
| openspec/changes/migrate-hypergraph-storage-to-nebulagraph/tasks.md | Adds migration task checklist artifact. |
| openspec/changes/migrate-hypergraph-storage-to-nebulagraph/specs/nebulagraph-hypergraph-storage/spec.md | Adds spec-driven requirements for NebulaGraph migration/validation/rollout. |
| openspec/changes/migrate-hypergraph-storage-to-nebulagraph/proposal.md | Adds high-level migration proposal artifact. |
| openspec/changes/migrate-hypergraph-storage-to-nebulagraph/design.md | Adds detailed design decisions and rollout plan artifact. |
| openspec/changes/migrate-hypergraph-storage-to-nebulagraph/.openspec.yaml | Declares OpenSpec change metadata. |
| hyperrag/nebulagraph_validation.py | Implements storage parity comparison + retrieval parity result primitive. |
| hyperrag/nebulagraph_storage.py | Provides in-memory NebulaGraph-backed BaseHypergraphStorage semantics (adapter scaffold). |
| hyperrag/nebulagraph_schema.py | Defines required schema DDL statements and space-statement helper. |
| hyperrag/nebulagraph_migration.py | Implements .hgdb snapshot loader and migration helpers (sync/async). |
| hyperrag/nebulagraph_ids.py | Implements canonical entity/hyperedge VIDs and stable normalization/hashing. |
| hyperrag/nebulagraph_config.py | Implements backend-mode resolution, NebulaGraph settings parsing, and coercion logic. |
| hyperrag/nebulagraph_client.py | Defines client protocol and test fake implementation. |
| hyperrag/hyperrag.py | Adds backend storage-class resolution gated by validated NebulaGraph serving. |
| docs/superpowers/plans/2026-06-10-nebulagraph-hypergraph-storage.md | Adds detailed implementation plan document for the NebulaGraph rollout. |
| docs/nebulagraph-hypergraph-storage.md | Adds operator-facing rollout documentation and current limitations. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+40
to
+47
| def _load_settings_defaults(): | ||
| if not os.path.exists(SETTINGS_FILE): | ||
| return {} | ||
| try: | ||
| with open(SETTINGS_FILE, 'r', encoding='utf-8') as f: | ||
| return json.load(f) | ||
| except Exception: | ||
| return {} |
Comment on lines
543
to
545
| embedding_func=EmbeddingFunc( | ||
| embedding_dim=embedding_dim, # text-embedding-3-small 的维度 | ||
| max_token_size=8192, |
Comment on lines
+274
to
+275
| embeddingModel: str = "text-embedding-v4" | ||
| embeddingDim: int = 1024 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.